package com.java;

import com.java.Impl.BinaryObserver;
import com.java.Impl.HexaObserver;
import com.java.Impl.OctalObserver;

/**
 * Hello world!
 *
 */
public class ObserverPatternDemo
{
    public static void main( String[] args )
    {
        Subject subject=new Subject();
        new HexaObserver(subject);
        new OctalObserver(subject);
        new BinaryObserver(subject);

        System.out.println("First state change:15");
        subject.setState(15);
        System.out.println("Second state chagne:10");
        subject.setState(10);
    }
}
